import { createStore, compose } from 'redux'
import reducer from './reducer'

// 同时启用 Redux DevTools Extension 和 redux-thunk
const composeEnhancers =
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;

const enhancer = composeEnhancers()


const store = createStore(
  reducer,
  enhancer
)

export default store